import {
  postRequest,
  postRequestList,
  postRequestData,
  postRequestJson,
  getRequest,
  getRequestInfo,
} from '../utils/request'
export const getPageTransportationOrder = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/transportationOrder/pageTransportationOrder`, data)
export const getSupplierAddressData = <T>(data?: any): Promise<IResponseData<T>> =>
  postRequestData(`/api/sop/sop/supplierTransportAddress/listAddress`, data)
export const addAddressReq = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierTransportAddress/addAddress`, data)
export const editAddressReq = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierTransportAddress/editAddress`, data)
export const delAddressReq = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierTransportAddress/deleteAddress`, data)
export const createTransportationOrder = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/createTransportationOrder`, data)
export const editTransportationOrder = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/editTransportationOrder`, data)
export const getTransportInfoReq = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/getTransportStatus`, data)
export const updateBoxQty = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/updateBoxQty`, data)
export const transportationOrderAppointment = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/appointment`, data)
export const transportationOrderCancel = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/cancel`, data)
export const cancelTransportationOrder = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/transportationOrder/cancelTransportationOrder`, data)
